
def sum_char(string, char):
    sum=0
    for i in range(len(string)):
        if string[i] == char:
            sum+=1
    return sum
print("请输入字符串")
string=input()
print("请输入字符")
char=input()
print(sum_char(string,char))